<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>[Generic Component Framework v3] GCF::Component Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--link href="tabs.css" rel="stylesheet" type="text/css"-->
</head><body>
 <div id="wrapper">
    <div id="logo_box">
        <a class="img_link" href="https://github.com/pnudupa/gcf" target="_blank" ><img style="float:left;margin-left:10px;margin-top:5px;margin-bottom:5px;"src="header_gcf_logo.jpg" alt="GCF LOGO"/></a>
        <a class="img_link" href="https://www.vcreatelogic.com/" target="_blank" ><img style="float:right;margin-right:10px; margin-top: 30px;" src="header_vcl_logo.jpg" alt="VCL LOGO"/></a>
        <div style="clear:both"></div>
    </div>
    <div class="nav">
        <ul>
            <li class="selectedpage">
                <a class="a-home" href="index.html" >
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a class="a-classes " href="classes.html">
                    <span>All Classes</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_modules.html">
                    <span>Modules</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_guides_and_videos.html">
                    <span>Guides & Videos</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_tools_and_inbuilt_components.html">
                    <span>Tools & Components</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main-content">
        <div class="inside">
        <div>
<!-- Generated by Doxygen 1.8.16 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GCF</b></li><li class="navelem"><a class="el" href="class_g_c_f_1_1_component.html">Component</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_g_c_f_1_1_component-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GCF::Component Class Reference<div class="ingroups"><a class="el" href="group__gcf__core.html">GCF Core Module</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for all GCF components.  
 <a href="class_g_c_f_1_1_component.html#details">More...</a></p>

<p><code>#include &lt;GCF3/Component&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0a8e6280e3029cab1db39d4a0b0cdf11"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a0a8e6280e3029cab1db39d4a0b0cdf11">Component</a> (QObject *parent=nullptr)</td></tr>
<tr class="separator:a0a8e6280e3029cab1db39d4a0b0cdf11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a424f54d7c57c719b0ec16c3094ca565a"><td class="memItemLeft" align="right" valign="top">virtual QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a> () const</td></tr>
<tr class="separator:a424f54d7c57c719b0ec16c3094ca565a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1902eb93c5fce2f2aa82e39b5fd2c494"><td class="memItemLeft" align="right" valign="top">virtual QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a1902eb93c5fce2f2aa82e39b5fd2c494">organization</a> () const</td></tr>
<tr class="separator:a1902eb93c5fce2f2aa82e39b5fd2c494"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac21a96f4b23f6ac1ce997c86726dba2e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_g_c_f_1_1_version.html">GCF::Version</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#ac21a96f4b23f6ac1ce997c86726dba2e">version</a> () const</td></tr>
<tr class="separator:ac21a96f4b23f6ac1ce997c86726dba2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac61518ed80c6a172b25cac4a6666f882"><td class="memItemLeft" align="right" valign="top">virtual QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#ac61518ed80c6a172b25cac4a6666f882">buildTimestamp</a> () const</td></tr>
<tr class="separator:ac61518ed80c6a172b25cac4a6666f882"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8105c199273cebd258ffda96e191c3d9"><td class="memItemLeft" align="right" valign="top">const QSettings *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">settings</a> () const</td></tr>
<tr class="separator:a8105c199273cebd258ffda96e191c3d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a051e5aca7176bec532dcf28e43012708"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a051e5aca7176bec532dcf28e43012708">isLoaded</a> () const</td></tr>
<tr class="separator:a051e5aca7176bec532dcf28e43012708"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e35213d5a5c8933a78a3fb10e737459"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a9e35213d5a5c8933a78a3fb10e737459">isActive</a> () const</td></tr>
<tr class="separator:a9e35213d5a5c8933a78a3fb10e737459"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06e3573f06292a5211b81201ced61deb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load</a> ()</td></tr>
<tr class="separator:a06e3573f06292a5211b81201ced61deb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c7530baab5694de7676a76eeb50eb3f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload</a> ()</td></tr>
<tr class="separator:a8c7530baab5694de7676a76eeb50eb3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a6e0f95047a60edfb6e25c374a74340"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a7a6e0f95047a60edfb6e25c374a74340">activate</a> ()</td></tr>
<tr class="separator:a7a6e0f95047a60edfb6e25c374a74340"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19620ff366fc68e58ddf532acb54a598"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a19620ff366fc68e58ddf532acb54a598">deactivate</a> ()</td></tr>
<tr class="separator:a19620ff366fc68e58ddf532acb54a598"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8791368cb9615392e6c9c2d380034f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#ac8791368cb9615392e6c9c2d380034f1">addContentObject</a> (const QString &amp;<a class="el" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>, QObject *object, const QVariantMap &amp;info=QVariantMap())</td></tr>
<tr class="separator:ac8791368cb9615392e6c9c2d380034f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5419a2ae3965f0994c50f68f48cb9ea5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a5419a2ae3965f0994c50f68f48cb9ea5">addContentObject</a> (QObject *object, const QVariantMap &amp;info=QVariantMap())</td></tr>
<tr class="separator:a5419a2ae3965f0994c50f68f48cb9ea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b0b7fe34462a0ba01ab38f348c024d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a5b0b7fe34462a0ba01ab38f348c024d6">removeContentObject</a> (QObject *object)</td></tr>
<tr class="separator:a5b0b7fe34462a0ba01ab38f348c024d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f1eee986efea04923574a43901a19f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a5f1eee986efea04923574a43901a19f2">removeContentObject</a> (const QString &amp;<a class="el" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>)</td></tr>
<tr class="separator:a5f1eee986efea04923574a43901a19f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a0da80fa064fa71d0e048ed9c45f54eec"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a0da80fa064fa71d0e048ed9c45f54eec">~Component</a> ()</td></tr>
<tr class="separator:a0da80fa064fa71d0e048ed9c45f54eec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06a056e6114fbaa341874a2064c6562b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a06a056e6114fbaa341874a2064c6562b">finalizeEvent</a> (<a class="el" href="class_g_c_f_1_1_finalize_event.html">GCF::FinalizeEvent</a> *e)</td></tr>
<tr class="separator:a06a056e6114fbaa341874a2064c6562b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75422842587613d43844e73fb8ca021d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a75422842587613d43844e73fb8ca021d">initializeEvent</a> (<a class="el" href="class_g_c_f_1_1_initialize_event.html">GCF::InitializeEvent</a> *e)</td></tr>
<tr class="separator:a75422842587613d43844e73fb8ca021d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a464361482ef9039aee875940ae64306c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a464361482ef9039aee875940ae64306c">activationEvent</a> (<a class="el" href="class_g_c_f_1_1_activation_event.html">GCF::ActivationEvent</a> *e)</td></tr>
<tr class="separator:a464361482ef9039aee875940ae64306c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b9e7071c2f4b483a4ee51b08b70835c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a7b9e7071c2f4b483a4ee51b08b70835c">contentLoadEvent</a> (<a class="el" href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a> *e)</td></tr>
<tr class="separator:a7b9e7071c2f4b483a4ee51b08b70835c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb0e763839f42c3cca61d22c3ee7e1ce"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#afb0e763839f42c3cca61d22c3ee7e1ce">deactivationEvent</a> (<a class="el" href="class_g_c_f_1_1_deactivation_event.html">GCF::DeactivationEvent</a> *e)</td></tr>
<tr class="separator:afb0e763839f42c3cca61d22c3ee7e1ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c46c693324b5e524e5c1188dfb4560d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a4c46c693324b5e524e5c1188dfb4560d">settingsLoadEvent</a> (<a class="el" href="class_g_c_f_1_1_settings_load_event.html">GCF::SettingsLoadEvent</a> *e)</td></tr>
<tr class="separator:a4c46c693324b5e524e5c1188dfb4560d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47f8742e87fa5ad86ed822cb60d90a79"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a47f8742e87fa5ad86ed822cb60d90a79">contentUnloadEvent</a> (<a class="el" href="class_g_c_f_1_1_content_unload_event.html">GCF::ContentUnloadEvent</a> *e)</td></tr>
<tr class="separator:a47f8742e87fa5ad86ed822cb60d90a79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03b90d525333d9a4e5f34fd16ad8bf35"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a03b90d525333d9a4e5f34fd16ad8bf35">settingsUnloadEvent</a> (<a class="el" href="class_g_c_f_1_1_settings_unload_event.html">GCF::SettingsUnloadEvent</a> *e)</td></tr>
<tr class="separator:a03b90d525333d9a4e5f34fd16ad8bf35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8447de04766d75220159e9db2ceeb5c8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">contentObjectLoadEvent</a> (<a class="el" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> *e)</td></tr>
<tr class="separator:a8447de04766d75220159e9db2ceeb5c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1de83ead9a736b7fe19f61626b24a5b6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a1de83ead9a736b7fe19f61626b24a5b6">contentObjectMergeEvent</a> (<a class="el" href="class_g_c_f_1_1_content_object_merge_event.html">GCF::ContentObjectMergeEvent</a> *e)</td></tr>
<tr class="separator:a1de83ead9a736b7fe19f61626b24a5b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a692d57781b5f4e9034624e31b6727c14"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">contentObjectUnloadEvent</a> (<a class="el" href="class_g_c_f_1_1_content_object_unload_event.html">GCF::ContentObjectUnloadEvent</a> *e)</td></tr>
<tr class="separator:a692d57781b5f4e9034624e31b6727c14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ddd32175fb6ca0dec4ca0b7443543ce"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a2ddd32175fb6ca0dec4ca0b7443543ce">contentObjectUnmergeEvent</a> (<a class="el" href="class_g_c_f_1_1_content_object_unmerge_event.html">GCF::ContentObjectUnmergeEvent</a> *e)</td></tr>
<tr class="separator:a2ddd32175fb6ca0dec4ca0b7443543ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdc6848ac70f5c13c78b6782a5666cd3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#acdc6848ac70f5c13c78b6782a5666cd3">activateContentObjectEvent</a> (<a class="el" href="class_g_c_f_1_1_activate_content_object_event.html">GCF::ActivateContentObjectEvent</a> *e)</td></tr>
<tr class="separator:acdc6848ac70f5c13c78b6782a5666cd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fe3cdb6bb891d7e67d498a3a55900b3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a8fe3cdb6bb891d7e67d498a3a55900b3">deactivateContentObjectEvent</a> (<a class="el" href="class_g_c_f_1_1_deactivate_content_object_event.html">GCF::DeactivateContentObjectEvent</a> *e)</td></tr>
<tr class="separator:a8fe3cdb6bb891d7e67d498a3a55900b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa764b26829ba318385b3921bf2b1800a"><td class="memItemLeft" align="right" valign="top">virtual QObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#aa764b26829ba318385b3921bf2b1800a">loadObject</a> (const QString &amp;<a class="el" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>, const QVariantMap &amp;info)</td></tr>
<tr class="separator:aa764b26829ba318385b3921bf2b1800a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad403e437d09e17139abe5bab8ae3f1e6"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#ad403e437d09e17139abe5bab8ae3f1e6">unloadObject</a> (const QString &amp;<a class="el" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>, QObject *object, const QVariantMap &amp;info)</td></tr>
<tr class="separator:ad403e437d09e17139abe5bab8ae3f1e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92c9170c1333e88d516ec3eca693bfda"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a92c9170c1333e88d516ec3eca693bfda">mergeObject</a> (QObject *parent, QObject *child, const QVariantMap &amp;parentInfo, const QVariantMap &amp;childInfo)</td></tr>
<tr class="separator:a92c9170c1333e88d516ec3eca693bfda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c371df2820b3c36a814005a4a9910df"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a8c371df2820b3c36a814005a4a9910df">unmergeObject</a> (QObject *parent, QObject *child, const QVariantMap &amp;parentInfo, const QVariantMap &amp;childInfo)</td></tr>
<tr class="separator:a8c371df2820b3c36a814005a4a9910df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa98b557a1c9a04a5f8f4586394174316"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#aa98b557a1c9a04a5f8f4586394174316">activateObject</a> (QObject *parent, QObject *child, const QVariantMap &amp;parentInfo, const QVariantMap &amp;childInfo)</td></tr>
<tr class="separator:aa98b557a1c9a04a5f8f4586394174316"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4018ebb487bbe088b34e662a38c61fc8"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_component.html#a4018ebb487bbe088b34e662a38c61fc8">deactivateObject</a> (QObject *parent, QObject *child, const QVariantMap &amp;parentInfo, const QVariantMap &amp;childInfo)</td></tr>
<tr class="separator:a4018ebb487bbe088b34e662a38c61fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class is at the heart of GCF's component model. A component, in GCF, is an entity that makes available one or more objects that can work in tandem with objects offered by other components in the application. Components are generally written for reusability. They can be written once and used in several different application contexts.</p>
<p>The <a class="el" href="class_g_c_f_1_1_component.html">GCF::Component</a> class offers a unified way to represent components, initialize (or load) and uninitialize (or unload) them in an application. Objects offered by components are registered with the application's object-tree ( <a class="el" href="class_g_c_f_1_1_application_services.html#a22657bd136cbf7a285cf0b273a40963a">GCF::ApplicationServices::objectTree()</a> ). This way, any component in the application can easily search for objects (and services) offered by any other component in the application.</p>
<p>To create your own component, you can subclass from <a class="el" href="class_g_c_f_1_1_component.html">GCF::Component</a> and implement your component's behavior. Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">    MyComponent(QObject *parent=0) : GCF::<a class="code" href="class_g_c_f_1_1_component.html#a0a8e6280e3029cab1db39d4a0b0cdf11">Component</a>(parent) { }</div>
<div class="line"> </div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    ~MyComponent() { }</div>
<div class="line">};</div>
<div class="line"> </div>
<div class="line">GCF_EXPORT_COMPONENT(MyComponent);</div>
</div><!-- fragment --><p>A couple of key points must be noticed from the code snippet above</p>
<ul>
<li>Constructor must be public, destructor must be protected. This is to ensure that the component can only be created on the heap and never on the stack.</li>
</ul>
<ul>
<li><code>GCF_EXPORT_COMPONENT</code> macro can be used to export the component class across shared-library boundaries. This should be done in a source file, and not in a header file.</li>
</ul>
<h1><a class="anchor" id="gcf_component_instantiation"></a>
Instantiating components</h1>
<p>A component is said to be instantiated if an instance of the component is created in memory. An instantiated component is however not useful and not included into the application. For that you will need to load the compoent. A loaded component is initialized and its objects are included in the application. Read the following sections to know more about this.</p>
<p>Components can be instantiated using any of the following means </p><ul>
<li>By loading the component from a shared library </li>
<li>By creating an instance of a component class</li>
</ul>
<p>To load a component from shared library, you can make use of the <a class="el" href="class_g_c_f_1_1_application_services.html#a9fe06a88ce3a56f825cd2e11be4b0cf0">GCF::ApplicationServices::loadComponent()</a> function. Example:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;GCF3/Application&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;GCF3/Component&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
<div class="line">{</div>
<div class="line">    <a class="code" href="class_g_c_f_1_1_application.html">GCF::Application</a> a(argc, argv);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a> *component = gAppService-&gt;loadComponent(<span class="stringliteral">&quot;GDrive/GDriveLite&quot;</span>);</div>
<div class="line">    <span class="keywordflow">if</span>(component)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// The component &quot;GDrive/GDriveLite&quot; has been instantiated</span></div>
<div class="line">        <span class="comment">// and initialized</span></div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">return</span> a.exec();</div>
<div class="line">}</div>
</div><!-- fragment --><p>If you want to instantiate the component from a shared library and load it later (explicitly); then you can use the <a class="el" href="class_g_c_f_1_1_application_services.html#a2d00007fdb8de827c1d47aac03e0d09c">GCF::ApplicationServices::instantiateComponent()</a> function. Example:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;GCF3/Application&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;GCF3/Component&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
<div class="line">{</div>
<div class="line">    <a class="code" href="class_g_c_f_1_1_application.html">GCF::Application</a> a(argc, argv);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a> *component = gAppService-&gt;instantiateComponent(<span class="stringliteral">&quot;GDrive/GDriveLite&quot;</span>);</div>
<div class="line">    <span class="keywordflow">if</span>(component)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// The component &quot;GDrive/GDriveLite&quot; has been instantiated</span></div>
<div class="line">        <span class="comment">// but __not__ initialized.</span></div>
<div class="line"> </div>
<div class="line">        ...</div>
<div class="line">        ...</div>
<div class="line">        ...</div>
<div class="line">        component-&gt;<a class="code" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load</a>();</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">return</span> a.exec();</div>
<div class="line">}</div>
</div><!-- fragment --><p>If you have access to the constructor of any subclass of <a class="el" href="class_g_c_f_1_1_component.html" title="Base class for all GCF components.">GCF::Component</a>, then you can instantiate the component using the <code>new</code> operator of C++ and then call the <a class="el" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load()</a> method on the component to load the component.</p>
<h1><a class="anchor" id="gcf_component_loading"></a>
Component loading (or initialization)</h1>
<p>One of the ways to load a component is by making use of the <a class="el" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load()</a> method. Example:</p>
<div class="fragment"><div class="line"><a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a> *comp = ....;</div>
<div class="line">comp-&gt;<a class="code" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load</a>();</div>
<div class="line"> </div>
<div class="line"><span class="comment">// By the time the load() function returns, the component is</span></div>
<div class="line"><span class="comment">// completely initialized and its content loaded.</span></div>
</div><!-- fragment --><p>While a component is being loaded, it receives one or more events. These events are handled by the event() method. As a component developer you can reimplement event handlers from this class and offer your own code. Following is the order in which events are despatched to the component (upon load)</p>
<p> 
<table border="0" cellpadding="5">
<tr><td>
</p>
<ul>
<li><b>Pre-Initialization</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a75422842587613d43844e73fb8ca021d">GCF::Component::initializeEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Pre-SettingsLoad</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a4c46c693324b5e524e5c1188dfb4560d">GCF::Component::settingsLoadEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Post-SettingsLoad</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a4c46c693324b5e524e5c1188dfb4560d">GCF::Component::settingsLoadEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Pre-ContentLoad</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a7b9e7071c2f4b483a4ee51b08b70835c">GCF::Component::contentLoadEvent()</a> for more information.</li>
</ul>
<ul>
<li>For each object loaded by the content-file, a <b><a class="el" href="class_g_c_f_1_1_content_object_load_event.html" title="Contains parameters that describe a content-object-load event.">GCF::ContentObjectLoadEvent</a></b> is sent. Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">GCF::Component::contentObjectLoadEvent()</a> for more information. And if any of the loaded content-objects, request for merge with content-objects from other components then <b><a class="el" href="class_g_c_f_1_1_content_object_merge_event.html" title="Contains parameters that describe a content-object-merge event.">GCF::ContentObjectMergeEvent</a></b> event is sent. Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a1de83ead9a736b7fe19f61626b24a5b6">GCF::Component::contentObjectMergeEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Post-ContentLoad</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a7b9e7071c2f4b483a4ee51b08b70835c">GCF::Component::contentLoadEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Post-Initialization</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a75422842587613d43844e73fb8ca021d">GCF::Component::initializeEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Pre-Activation</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a464361482ef9039aee875940ae64306c">GCF::Component::activationEvent()</a> for more information. After the pre-activation event is handled by the component, each and every content object of the component is activated.</li>
</ul>
<ul>
<li><b>Post-Activation</b>: Read documentation of <a class="el" href="class_g_c_f_1_1_component.html#a464361482ef9039aee875940ae64306c">GCF::Component::activationEvent()</a> for more information.</li>
</ul>
<p>Once the post-initialization event has been handled; the component is considered to have been initialized.</p>
<p> 
</td><td>
</p>
<div class="image">
<img src="gcf-component-load-events.png" alt=""/>
</div>
<p> 
</td></tr></table>
</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gcf_component_model.html#gcf_component_model_5">How component loading works</a></dd></dl>
<h1><a class="anchor" id="gcf_component_unloading"></a>
Component unloading (or uninitialization)</h1>
<p>One of the ways to unload a component is to make use of the <a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload()</a> method. Example:</p>
<div class="fragment"><div class="line"><a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a> *comp = ....;</div>
<div class="line">comp-&gt;<a class="code" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload</a>();</div>
<div class="line"> </div>
<div class="line"><span class="comment">// By the time the unload() function returns, the component is</span></div>
<div class="line"><span class="comment">// completely unloaded and the component object is deleted.</span></div>
<div class="line"> </div>
<div class="line">comp = 0;</div>
</div><!-- fragment --><p>When a component is being to unloading, it receives one or more events. These events are handled by the event() method. As a component developer you can reimplement event handlers from this class and offer your own code. Following is the order in which events are despatched to the component (upon unload)</p>
<p> 
<table border="0" cellpadding="5">
<tr><td>
</p>
<ul>
<li><b>Pre-Deactivation</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#afb0e763839f42c3cca61d22c3ee7e1ce">GCF::Component::deactivationEvent()</a> for more information. After pre-deactivation is handled, each and every content object is deactivated.</li>
</ul>
<ul>
<li><b>Post-Deactivation</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a4018ebb487bbe088b34e662a38c61fc8">GCF::Component::deactivateObject()</a> for more information.</li>
</ul>
<ul>
<li><b>Pre-Finalize</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a06a056e6114fbaa341874a2064c6562b">GCF::Component::finalizeEvent()</a> for more inforamtion.</li>
</ul>
<ul>
<li><b>Pre-ContentUnload</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a47f8742e87fa5ad86ed822cb60d90a79">GCF::Component::contentUnloadEvent()</a> for more information.</li>
</ul>
<ul>
<li>For each content-object loaded during <a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload()</a>, a <a class="el" href="class_g_c_f_1_1_content_object_unmerge_event.html">GCF::ContentObjectUnmergeEvent</a> event is first sent for unmerging the object ( <a class="el" href="class_g_c_f_1_1_component.html#a2ddd32175fb6ca0dec4ca0b7443543ce">GCF::Component::contentObjectUnmergeEvent()</a> ) and <code><a class="el" href="class_g_c_f_1_1_content_object_unload_event.html" title="Contains parameters that describe a content-object-unload event.">GCF::ContentObjectUnloadEvent</a></code> is sent for unloading the object ( <a class="el" href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">GCF::Component::contentObjectUnloadEvent()</a> )</li>
</ul>
<ul>
<li><b>Post-ContentUnload</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a47f8742e87fa5ad86ed822cb60d90a79">GCF::Component::contentUnloadEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Pre-SettingsUnload</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a03b90d525333d9a4e5f34fd16ad8bf35">GCF::Component::settingsUnloadEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Post-SettingsUnload</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a03b90d525333d9a4e5f34fd16ad8bf35">GCF::Component::settingsUnloadEvent()</a> for more information.</li>
</ul>
<ul>
<li><b>Post-Finalize</b>: Read <a class="el" href="class_g_c_f_1_1_component.html#a06a056e6114fbaa341874a2064c6562b">GCF::Component::finalizeEvent()</a> for more information.</li>
</ul>
<p>After the post-finalize event is handled, the component object is deleted.</p>
<p> 
</td><td>
</p>
<div class="image">
<img src="gcf-component-unload-events.png" alt=""/>
</div>
<p> 
</td></tr></table>
</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gcf_component_model.html#gcf_component_model_5_5">How component unloading works</a></dd></dl>
<h1><a class="anchor" id="gcf_component_contentfile"></a>
Content File</h1>
<p>Each component can (optionally) provide a content file listing the content-objects offered by it.</p>
<p>A component specifies the content-file that it uses via the <a class="el" href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a> class when its <a class="el" href="class_g_c_f_1_1_component.html#a7b9e7071c2f4b483a4ee51b08b70835c">GCF::Component::contentLoadEvent()</a> is called. A typical implementation of this event handler would be</p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> ComponentClass::contentLoadEvent(<a class="code" href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a> *e)</div>
<div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_content_load_event.html#a033302e12daeb121564490a8f794417f">isPreContentLoad</a>())</div>
<div class="line">        e-&gt;<a class="code" href="class_g_c_f_1_1_content_load_event.html#a9a6a2ddca167a46d10d76111f64777e1">setContentFile</a>(....);</div>
<div class="line">}</div>
</div><!-- fragment --><p>A content file is written in XML. At the most basic level, a content file has a root <code>content</code> XML element and one or more <code>object</code> XML elements under it. Example:</p>
<div class="fragment"><div class="line">&lt;content&gt;</div>
<div class="line"> </div>
<div class="line">    &lt;<span class="keywordtype">object</span> <a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>=<span class="stringliteral">&quot;object1&quot;</span> key11=<span class="stringliteral">&quot;value1&quot;</span> key12=<span class="stringliteral">&quot;value2&quot;</span> key13=<span class="stringliteral">&quot;value3&quot;</span> /&gt;</div>
<div class="line">    &lt;<span class="keywordtype">object</span> <a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>=<span class="stringliteral">&quot;object2&quot;</span> key21=<span class="stringliteral">&quot;value1&quot;</span> key22=<span class="stringliteral">&quot;value2&quot;</span> key23=<span class="stringliteral">&quot;value3&quot;</span> /&gt;</div>
<div class="line">    ...</div>
<div class="line">    ...</div>
<div class="line">    ...</div>
<div class="line">    &lt;<span class="keywordtype">object</span> <a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>=<span class="stringliteral">&quot;objectn&quot;</span> keyn1=<span class="stringliteral">&quot;value1&quot;</span> keyn2=<span class="stringliteral">&quot;value2&quot;</span> keyn3=<span class="stringliteral">&quot;value3&quot;</span> /&gt;</div>
<div class="line"> </div>
<div class="line">&lt;/content&gt;</div>
</div><!-- fragment --><p>Whenever an <code>object</code> element is parsed by GCF, it sends a <a class="el" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> event to the component. Whatever object is created and reported via the event is associated with that name. Example:</p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> ComponentClass::contentObjectLoadEvent(<a class="code" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> *e)</div>
<div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#a01c95daa931ecc802bf0ec42c7d03206">objectName</a>() == <span class="stringliteral">&quot;object1&quot;</span>)</div>
<div class="line">    {</div>
<div class="line">        QObject *<span class="keywordtype">object</span> = .....; <span class="comment">// create the object</span></div>
<div class="line">        e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">setObject</a>(<span class="keywordtype">object</span>);</div>
<div class="line">        <span class="keywordflow">return</span>;</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#a01c95daa931ecc802bf0ec42c7d03206">objectName</a>() == <span class="stringliteral">&quot;object2&quot;</span>)</div>
<div class="line">    {</div>
<div class="line">        QObject *<span class="keywordtype">object</span> = .....; <span class="comment">// create the object</span></div>
<div class="line">        e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">setObject</a>(<span class="keywordtype">object</span>);</div>
<div class="line">        <span class="keywordflow">return</span>;</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    .....</div>
<div class="line">    .....</div>
<div class="line">    .....</div>
<div class="line">    .....</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#a01c95daa931ecc802bf0ec42c7d03206">objectName</a>() == <span class="stringliteral">&quot;objectn&quot;</span>)</div>
<div class="line">    {</div>
<div class="line">        QObject *<span class="keywordtype">object</span> = .....; <span class="comment">// create the object</span></div>
<div class="line">        e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">setObject</a>(<span class="keywordtype">object</span>);</div>
<div class="line">        <span class="keywordflow">return</span>;</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment --><p>You could also optionally do away with implementation of <code><a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">contentObjectLoadEvent()</a></code> and simply implement the <a class="el" href="class_g_c_f_1_1_component.html#aa764b26829ba318385b3921bf2b1800a">GCF::Component::loadObject()</a> to behave like a factory method to create <code>QObject</code> instances based on the name. This is because the default implementation of <a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">GCF::Component::contentObjectLoadEvent()</a> calls the <a class="el" href="class_g_c_f_1_1_component.html#aa764b26829ba318385b3921bf2b1800a">GCF::Component::loadObject()</a></p>
<div class="fragment"><div class="line">QObject *ComponentClass::loadObject(<span class="keyword">const</span> QString &amp;<a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>, <span class="keyword">const</span> QVariantMap &amp;info)</div>
<div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span>(<a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a> == <span class="stringliteral">&quot;object1&quot;</span>)</div>
<div class="line">        <span class="keywordflow">return</span> .....; <span class="comment">// create the object</span></div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span>(<a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a> == <span class="stringliteral">&quot;object2&quot;</span>)</div>
<div class="line">        <span class="keywordflow">return</span> .....; <span class="comment">// create the object</span></div>
<div class="line"> </div>
<div class="line">    .......</div>
<div class="line">    .......</div>
<div class="line">    .......</div>
<div class="line">    .......</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span>(<a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a> == <span class="stringliteral">&quot;objectn&quot;</span>)</div>
<div class="line">        <span class="keywordflow">return</span> .....; <span class="comment">// create the object</span></div>
<div class="line">}</div>
</div><!-- fragment --><p>The <code>info</code> parameter passed to the <code><a class="el" href="class_g_c_f_1_1_component.html#aa764b26829ba318385b3921bf2b1800a">loadObject()</a></code> method or accessed via the <a class="el" href="class_g_c_f_1_1_content_object_load_event.html#adb2609b60cbd7beb86f426111a0fb262">GCF::ContentObjectLoadEvent::info()</a> method on the event-object, contains all key=value pairs provided in the <code>object</code> XML element.</p>
<p>You can also configure object properties and create signal/slot connections in the content-xml file. Read <a class="el" href="gcf_content_xml.html">GCF Content XML File Specification</a> for more information.</p>
<h1><a class="anchor" id="gcf_component_activation"></a>
Activation</h1>
<p>Components can be activated by calling the <a class="el" href="class_g_c_f_1_1_component.html#a7a6e0f95047a60edfb6e25c374a74340">activate()</a> method. When this method is called GCF sends a <a class="el" href="class_g_c_f_1_1_activation_event.html">GCF::ActivationEvent</a> event to the component, which can be handled by reimplementing the <a class="el" href="class_g_c_f_1_1_component.html#a464361482ef9039aee875940ae64306c">activationEvent()</a> virtual function. The activation event is actually sent twice to the component. GCF first sends a pre-activation event to the component. After this event is handled, it sends a <a class="el" href="class_g_c_f_1_1_activate_content_object_event.html">GCF::ActivateContentObjectEvent</a> event to the component against each of its content objects. This event can be handled by reimplementing the <a class="el" href="class_g_c_f_1_1_component.html#acdc6848ac70f5c13c78b6782a5666cd3">activateContentObjectEvent()</a> function. Finally, GCF sends a post-activtion event to the component.</p>
<p>By default components are activated at the end of <a class="el" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load()</a>.</p>
<h1><a class="anchor" id="gcf_component_deactivation"></a>
Deactivation</h1>
<p>Just as with <a class="el" href="class_g_c_f_1_1_component.html#gcf_component_activation">component activation</a>, a component can be deactivated by calling the <a class="el" href="class_g_c_f_1_1_component.html#a19620ff366fc68e58ddf532acb54a598">deactivate()</a> method. When this method is called, GCF sends a <a class="el" href="class_g_c_f_1_1_deactivation_event.html">GCF::DeactivationEvent</a> event to the component, which can be handled by reimplementing the deactiationEvent() virtual function. The deactivation is sent twice to the component. GCF first sends a pre-deactivation event. After that it sends a <a class="el" href="class_g_c_f_1_1_deactivate_content_object_event.html">GCF::DeactivateContentObjectEvent</a> event to the component against each of its content objects. This event can be handled by reimplementing the <a class="el" href="class_g_c_f_1_1_component.html#a8fe3cdb6bb891d7e67d498a3a55900b3">deactivateContentObjectEvent()</a> function. Finally, GCF sends a post-deactivtion event to the component.</p>
<p>By default components are deactivated at the start of <a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload()</a>.</p>
<h1><a class="anchor" id="gcf_component_objectTree"></a>
Application Object Tree</h1>
<p>Objects loaded from the parsing of a content-file is registered with the application's object tree accessible via <code>gAppService-&gt;objectTree()</code>. This part is explained in the following video</p>
<p> 
<video width="500" controls>
    <source src="../../../Videos/Concepts/Component-Model.mp4" type="video/mp4">
</video>
<p>If you are unable to view the embedded video above, please click <a href="http://player.vimeo.com/video/77953239" target="_blank">here</a> to view it on the web.</p>
</p>
<p>There are more ways in which objects can be registered with the application and included in the application object tree. Please read the section on <a class="el" href="gcf_component_model.html#gcf_component_model_6">Registering objects</a> to know more about this. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0a8e6280e3029cab1db39d4a0b0cdf11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a8e6280e3029cab1db39d4a0b0cdf11">&#9670;&nbsp;</a></span>Component()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::Component::Component </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>nullptr</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor for instantiating the component.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_instantiation">Instantiating components</a> </dd></dl>

</div>
</div>
<a id="a0da80fa064fa71d0e048ed9c45f54eec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0da80fa064fa71d0e048ed9c45f54eec">&#9670;&nbsp;</a></span>~Component()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::Component::~Component </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destructor.</p>
<dl class="section note"><dt>Note</dt><dd>If you are subclassing from <a class="el" href="class_g_c_f_1_1_component.html">GCF::Component</a>, it is recommended that you declare destructor as protected. This will ensure that your component can only be created on the heap, never on the stack. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a424f54d7c57c719b0ec16c3094ca565a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a424f54d7c57c719b0ec16c3094ca565a">&#9670;&nbsp;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString GCF::Component::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this function to return a name for your component. By default this function returns the name of the component-class.</p>
<dl class="section note"><dt>Note</dt><dd>If you are reimplementing this function, return a string name that confirms to class-naming conventions of C++. [No spaces, first letter should be character, no special characters apart from _] </dd></dl>

</div>
</div>
<a id="a1902eb93c5fce2f2aa82e39b5fd2c494"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1902eb93c5fce2f2aa82e39b5fd2c494">&#9670;&nbsp;</a></span>organization()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString GCF::Component::organization </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this function to return the name of your organization. By default this function returns qApp-&gt;organizationName() </p>

</div>
</div>
<a id="ac21a96f4b23f6ac1ce997c86726dba2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac21a96f4b23f6ac1ce997c86726dba2e">&#9670;&nbsp;</a></span>version()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_g_c_f_1_1_version.html">GCF::Version</a> GCF::Component::version </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this function to return a version number for your component. By default this function return <a class="el" href="class_g_c_f_1_1_version.html">GCF::Version(1,0,0)</a>; </p>

</div>
</div>
<a id="ac61518ed80c6a172b25cac4a6666f882"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac61518ed80c6a172b25cac4a6666f882">&#9670;&nbsp;</a></span>buildTimestamp()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString GCF::Component::buildTimestamp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this function to return a build-timestamp. This should be the date and time of the last time the component was built. By default this function returns <code>__TIMESTAMP__</code> </p>

</div>
</div>
<a id="a8105c199273cebd258ffda96e191c3d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8105c199273cebd258ffda96e191c3d9">&#9670;&nbsp;</a></span>settings()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QSettings * GCF::Component::settings </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns settings of this component. The function will return a NULL pointer until a <b>Post-SettingsLoad</b> event (<a class="el" href="class_g_c_f_1_1_settings_load_event.html">GCF::SettingsLoadEvent</a>) is delivered. It will return a valid pointer to <code>QSettings</code> after that.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

</div>
</div>
<a id="a051e5aca7176bec532dcf28e43012708"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a051e5aca7176bec532dcf28e43012708">&#9670;&nbsp;</a></span>isLoaded()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::isLoaded </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns true if the component has been loaded completely. False otherwise. A component is considered loaded if it has received the <b>Post-Initialize</b> event (<a class="el" href="class_g_c_f_1_1_initialize_event.html">GCF::InitializeEvent</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

</div>
</div>
<a id="a9e35213d5a5c8933a78a3fb10e737459"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e35213d5a5c8933a78a3fb10e737459">&#9670;&nbsp;</a></span>isActive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::isActive </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns true if the component has been loaded and activated. False otherwise.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_activation">Activation</a> </dd></dl>

</div>
</div>
<a id="a06e3573f06292a5211b81201ced61deb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06e3573f06292a5211b81201ced61deb">&#9670;&nbsp;</a></span>load()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::load </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Loads the component.</p>
<dl class="section note"><dt>Note</dt><dd>If the component has already been loaded, then this function is a no-op.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

</div>
</div>
<a id="a8c7530baab5694de7676a76eeb50eb3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c7530baab5694de7676a76eeb50eb3f">&#9670;&nbsp;</a></span>unload()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::unload </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unloads the component. The component is deleted by the time it returns.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_unloading">Component unloading (or uninitialization)</a> </dd></dl>

</div>
</div>
<a id="a7a6e0f95047a60edfb6e25c374a74340"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a6e0f95047a60edfb6e25c374a74340">&#9670;&nbsp;</a></span>activate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::activate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Activates the component.</p>
<dl class="section note"><dt>Note</dt><dd>If the component is already active, then this function is a no-op.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_activation">Activation</a>, <a class="el" href="class_g_c_f_1_1_component.html#a9e35213d5a5c8933a78a3fb10e737459">isActive()</a> </dd></dl>

</div>
</div>
<a id="a19620ff366fc68e58ddf532acb54a598"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19620ff366fc68e58ddf532acb54a598">&#9670;&nbsp;</a></span>deactivate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::deactivate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Deactivates the component.</p>
<dl class="section note"><dt>Note</dt><dd>If the component is already inactive, then this function is a no-op.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_deactivation">Deactivation</a>, <a class="el" href="class_g_c_f_1_1_component.html#a9e35213d5a5c8933a78a3fb10e737459">isActive()</a> </dd></dl>

</div>
</div>
<a id="ac8791368cb9615392e6c9c2d380034f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8791368cb9615392e6c9c2d380034f1">&#9670;&nbsp;</a></span>addContentObject() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::addContentObject </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>info</em> = <code>QVariantMap()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function allows you to programmatically add a content-object to the component's object tree, which makes it possible for other components in the application to search for and reference the added object.</p>
<p>Read <a class="el" href="class_g_c_f_1_1_component.html#gcf_component_objectTree">Application Object Tree</a> for more information about object-trees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>a string name for the added object. Names should following C++ object-naming convention. </td></tr>
    <tr><td class="paramname">object</td><td>pointer to the <code>QObject</code> that is being added. If NULL, then this function is a no-op. </td></tr>
    <tr><td class="paramname">info</td><td>optional key=value map that contains additional information about the content object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function cannot be called within <a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">contentObjectLoadEvent()</a> and <a class="el" href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">contentObjectUnloadEvent()</a> </dd></dl>

</div>
</div>
<a id="a5419a2ae3965f0994c50f68f48cb9ea5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5419a2ae3965f0994c50f68f48cb9ea5">&#9670;&nbsp;</a></span>addContentObject() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::addContentObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>info</em> = <code>QVariantMap()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function allows you to programmatically add a content-object to the component's object tree, which makes it possible for other components in the application to search for and reference the added object.</p>
<p>Read <a class="el" href="class_g_c_f_1_1_component.html#gcf_component_objectTree">Application Object Tree</a> for more information about object-trees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>pointer to the <code>QObject</code> that is being added. The <code>objectName()</code> of the object is considered to be the <code>name</code> of the object in the object tree. </td></tr>
    <tr><td class="paramname">info</td><td>optional key=value map that contains additional information about the content object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function cannot be called within <a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">contentObjectLoadEvent()</a> and <a class="el" href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">contentObjectUnloadEvent()</a> </dd></dl>

</div>
</div>
<a id="a5b0b7fe34462a0ba01ab38f348c024d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b0b7fe34462a0ba01ab38f348c024d6">&#9670;&nbsp;</a></span>removeContentObject() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::removeContentObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>object</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function removes a content-object from the component's object tree.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>pointer to the <code>QObject</code> that needs to be removed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The <code>QObject</code> refererred to by <code>object</code> will not be deleted by this function. </dd></dl>

</div>
</div>
<a id="a5f1eee986efea04923574a43901a19f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f1eee986efea04923574a43901a19f2">&#9670;&nbsp;</a></span>removeContentObject() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::removeContentObject </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function removes a content-object from the component's object tree.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>name of the object that needs to be removed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The <code>QObject</code> refererred to by <code>name</code> will not be deleted by this function. </dd></dl>

</div>
</div>
<a id="a06a056e6114fbaa341874a2064c6562b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06a056e6114fbaa341874a2064c6562b">&#9670;&nbsp;</a></span>finalizeEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::finalizeEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_finalize_event.html">GCF::FinalizeEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post finalization events. This function is called as a part of the <a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload()</a> process. The function can be reimplemented to</p>
<ul>
<li>Prepare the component for finalization during <b>Pre-Finalize</b> </li>
<li>Clean up memory and prepare for deletion during <b>Post-Finalize</b> </li>
</ul>
<p>The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to <a class="el" href="class_g_c_f_1_1_finalize_event.html">GCF::FinalizeEvent</a> object that describes this event </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a75422842587613d43844e73fb8ca021d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75422842587613d43844e73fb8ca021d">&#9670;&nbsp;</a></span>initializeEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::initializeEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_initialize_event.html">GCF::InitializeEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post initialization events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_initialize_event.html">GCF::InitializeEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>This is the first event that gets delivered to a component during load. Typically this function is reimplemented to handle </p><ul>
<li><code>Pre-Initialzation</code> time to initialize component's objects and variables (or examine system environment) before the component's settings and content get loaded. </li>
<li><code>Post-Initialization</code> time to do some work after the component is completely loaded, but before it is activated.</li>
</ul>
<p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a75422842587613d43844e73fb8ca021d">initializeEvent</a>(<a class="code" href="class_g_c_f_1_1_initialize_event.html">GCF::InitializeEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_initialize_event.html#a4b61e463cf081b95e8e227d6a28f60ef">isPreInitialize</a>()) {</div>
<div class="line">             <span class="comment">// Pre-initialization work</span></div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">             <span class="comment">// Post-initialization work</span></div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#acc878e70ab78b826a58d488c85a7adf7">GCF::QmlComponent</a>.</p>

</div>
</div>
<a id="a464361482ef9039aee875940ae64306c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a464361482ef9039aee875940ae64306c">&#9670;&nbsp;</a></span>activationEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::activationEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_activation_event.html">GCF::ActivationEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post activation events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_activation_event.html">GCF::ActivationEvent</a> object that describes this event.</td></tr>
  </table>
  </dd>
</dl>
<p>This event gets delivered during <a class="el" href="class_g_c_f_1_1_component.html#a7a6e0f95047a60edfb6e25c374a74340">activate()</a> process. The event handler can be reimplemented to perform some tasks just before and just after activation. </p>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#a8d20f66abca3b375227adbf099444266">GCF::QmlComponent</a>.</p>

</div>
</div>
<a id="a7b9e7071c2f4b483a4ee51b08b70835c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b9e7071c2f4b483a4ee51b08b70835c">&#9670;&nbsp;</a></span>contentLoadEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::contentLoadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post content-load events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>This event is delivered to the component during its <a class="el" href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">load()</a> process. Typically this function is implemented to </p><ul>
<li>Offer name of the content file to load during <b>Pre-ContentLoad</b> </li>
<li>Initialize loaded content objects during <b>Post-ContentLoad</b> </li>
</ul>
<p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a7b9e7071c2f4b483a4ee51b08b70835c">contentLoadEvent</a>(<a class="code" href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_content_load_event.html#a033302e12daeb121564490a8f794417f">isPreContentLoad</a>()) {</div>
<div class="line">            e-&gt;<a class="code" href="class_g_c_f_1_1_content_load_event.html#a9a6a2ddca167a46d10d76111f64777e1">setContentFile</a>(...);</div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">            <span class="comment">// Initialize or do anything else with loaded content</span></div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

</div>
</div>
<a id="afb0e763839f42c3cca61d22c3ee7e1ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb0e763839f42c3cca61d22c3ee7e1ce">&#9670;&nbsp;</a></span>deactivationEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::deactivationEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_deactivation_event.html">GCF::DeactivationEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post deactivation events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_deactivation_event.html">GCF::DeactivationEvent</a> object that describes this event.</td></tr>
  </table>
  </dd>
</dl>
<p>This event gets delivered during <a class="el" href="class_g_c_f_1_1_component.html#a19620ff366fc68e58ddf532acb54a598">deactivate()</a> process. The event handler can be reimplemented to perform some tasks just before and just after deactivation. </p>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#ae94060a64aed580940b7e396d137e3bd">GCF::QmlComponent</a>.</p>

</div>
</div>
<a id="a4c46c693324b5e524e5c1188dfb4560d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c46c693324b5e524e5c1188dfb4560d">&#9670;&nbsp;</a></span>settingsLoadEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::settingsLoadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_settings_load_event.html">GCF::SettingsLoadEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post settings-load events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_settings_load_event.html">GCF::SettingsLoadEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>This is the second event that gets delivered to a component during load. Typically this function is implemented to </p><ul>
<li>Offer name of the settings file to load in <code>Pre-SettingsLoad</code>. </li>
<li>Process the loaded settings in <code>Post-SettingsLoad</code> </li>
</ul>
<p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a4c46c693324b5e524e5c1188dfb4560d">settingsLoadEvent</a>(<a class="code" href="class_g_c_f_1_1_settings_load_event.html">GCF::SettingsLoadEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_settings_load_event.html#aff9ed273a55bc88de7cf90f9193f1f62">isPreSettingsLoad</a>())</div>
<div class="line">            e-&gt;<a class="code" href="class_g_c_f_1_1_settings_load_event.html#a2e1c4937774e651e1dc8f9fc24249956">setSettingsFile</a>(....);</div>
<div class="line">        <span class="keywordflow">else</span> {</div>
<div class="line">            <span class="keyword">const</span> QSettings *<a class="code" href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">settings</a> = this-&gt;<a class="code" href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">settings</a>();</div>
<div class="line">            <span class="comment">// process loaded settings</span></div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

</div>
</div>
<a id="a47f8742e87fa5ad86ed822cb60d90a79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47f8742e87fa5ad86ed822cb60d90a79">&#9670;&nbsp;</a></span>contentUnloadEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::contentUnloadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_content_unload_event.html">GCF::ContentUnloadEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post content-unload events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_content_unload_event.html">GCF::ContentUnloadEvent</a> object that describes the event</td></tr>
  </table>
  </dd>
</dl>
<p>This event is called during the <a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload()</a> process. Typically this function is implemented to</p>
<ul>
<li>Prepare the component and its content-objects for unloading during <b>Pre-ContentUnload</b> </li>
<li>Release any additional memory occupied for managing the content of the component during <b>Post-ContentUnload</b> </li>
</ul>
<p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a47f8742e87fa5ad86ed822cb60d90a79">contentUnloadEvent</a>(<a class="code" href="class_g_c_f_1_1_content_unload_event.html">GCF::ContentUnloadEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;isPreContentLoad()) {</div>
<div class="line">            <span class="comment">// Prepare for unload</span></div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">            <span class="comment">// Cleanup after unload</span></div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_unloading">Component unloading (or uninitialization)</a> </dd></dl>

</div>
</div>
<a id="a03b90d525333d9a4e5f34fd16ad8bf35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03b90d525333d9a4e5f34fd16ad8bf35">&#9670;&nbsp;</a></span>settingsUnloadEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::settingsUnloadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_settings_unload_event.html">GCF::SettingsUnloadEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle pre and post settings-unload events. The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_settings_unload_event.html">GCF::SettingsUnloadEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>This event is delivered to the component during its <a class="el" href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">unload()</a> process. Typically this function is implemented to </p><ul>
<li>Add/remove/alter keys and/or values in <a class="el" href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">settings()</a> in <code>Pre-SettingsUnload</code>. </li>
<li>Release any memory occupied for handling component settings in <code>Post-SettingsUnload</code> </li>
</ul>
<p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a03b90d525333d9a4e5f34fd16ad8bf35">settingsUnloadEvent</a>(<a class="code" href="class_g_c_f_1_1_settings_unload_event.html">GCF::SettingsUnloadEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;<a class="code" href="class_g_c_f_1_1_settings_unload_event.html#a5bea1fb732ecdb5227a9a404de5515c5">isPreSettingsUnload</a>()) {</div>
<div class="line">            QSettings *<a class="code" href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">settings</a> = const_cast&lt;QSettings*&gt;(this-&gt;<a class="code" href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">settings</a>());</div>
<div class="line">            <span class="comment">// add/remove/alter settings here</span></div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">            <span class="comment">// release any memory used for handling configuration parameters</span></div>
<div class="line">            <span class="comment">// sourced from settings</span></div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a> </dd></dl>

</div>
</div>
<a id="a8447de04766d75220159e9db2ceeb5c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8447de04766d75220159e9db2ceeb5c8">&#9670;&nbsp;</a></span>contentObjectLoadEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::contentObjectLoadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle content object load events. This event handler is called whenever an <code>object</code> XML element is encountered in the content file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>The default implementation of this event-handler calls the <a class="el" href="class_g_c_f_1_1_component.html#aa764b26829ba318385b3921bf2b1800a">loadObject()</a> method and sets the object returned from it into <a class="el" href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">GCF::ContentObjectLoadEvent::setObject()</a>. It is recommended that you implement <a class="el" href="class_g_c_f_1_1_component.html#aa764b26829ba318385b3921bf2b1800a">loadObject()</a> instead of this event handler for loading content objects.</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">contentObjectLoadEvent</a>(<a class="code" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;name() == ....)</div>
<div class="line">            e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">setObject</a>(...);</div>
<div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(e-&gt;name() == ....)</div>
<div class="line">            e-&gt;<a class="code" href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">setObject</a>(...)</div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_contentfile">Content File</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#a4369fecfd2a15454b5910aedb26f468e">GCF::QmlComponent</a>, and <a class="el" href="class_g_c_f_1_1_gui_component.html#ada64bbc4fc1f124812e60a20bf3ac566">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="a1de83ead9a736b7fe19f61626b24a5b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1de83ead9a736b7fe19f61626b24a5b6">&#9670;&nbsp;</a></span>contentObjectMergeEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::contentObjectMergeEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_content_object_merge_event.html">GCF::ContentObjectMergeEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle content-object merge events. This event handler is called if a content-object that is currently being loaded by GCF needs to be merged with a content-object belonging to this component.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_content_object_merge_event.html">GCF::ContentObjectMergeEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>A merge happens when the <code>parent</code> attribute of <code>object</code> XML element (that caused creation of a content-object) refers to a content object belonging to this component.</p>
<p>Example: Suppose that this component (by name MyComponent) is offering an object by name 'container'. Also suppose that another component has a content XML file as shown below</p>
<div class="fragment"><div class="line">&lt;content&gt;</div>
<div class="line">    &lt;<span class="keywordtype">object</span> <a class="code" href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">name</a>=<span class="stringliteral">&quot;object&quot;</span> parent=<span class="stringliteral">&quot;MyComponent.container&quot;</span> /&gt;</div>
<div class="line">&lt;/content&gt;</div>
</div><!-- fragment --><p>After the other component has finished handling <a class="el" href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a> for <code>object</code>, a <a class="el" href="class_g_c_f_1_1_content_object_merge_event.html">GCF::ContentObjectMergeEvent</a> is sent to this component with </p><ul>
<li>pointer to 'container' </li>
<li>pointer to 'object' </li>
<li>key=value information map of 'container' </li>
<li>key=value information map of 'object'</li>
</ul>
<p>This event handler can then customize the way in which parenting (or merging) happens for 'container' and 'object'. For example, in a real world scenario, implementations of this event handler could add a child-widget into a tab of the parent-widget.</p>
<dl class="section note"><dt>Note</dt><dd>The default implementation of this event handler calls <a class="el" href="class_g_c_f_1_1_component.html#a92c9170c1333e88d516ec3eca693bfda">mergeObject()</a>. It is recommended that you implement <a class="el" href="class_g_c_f_1_1_component.html#a92c9170c1333e88d516ec3eca693bfda">mergeObject()</a> instead of this event handler.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_loading">Component loading (or initialization)</a>, <a class="el" href="class_g_c_f_1_1_component.html#gcf_component_contentfile">Content File</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#a9c927dfcac5f5388bb78efb94c1e420a">GCF::QmlComponent</a>, and <a class="el" href="class_g_c_f_1_1_gui_component.html#a862fb78fdba64b956eab4c8a82c89b07">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="a692d57781b5f4e9034624e31b6727c14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a692d57781b5f4e9034624e31b6727c14">&#9670;&nbsp;</a></span>contentObjectUnloadEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::contentObjectUnloadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_content_object_unload_event.html">GCF::ContentObjectUnloadEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle content object load events. This event handler is called whenever a object XML element is encountered in the content file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_content_object_unload_event.html">GCF::ContentObjectUnloadEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>The default implementation of this event-handler calls the <a class="el" href="class_g_c_f_1_1_component.html#ad403e437d09e17139abe5bab8ae3f1e6">unloadObject()</a> method. It is recommended that you implement <a class="el" href="class_g_c_f_1_1_component.html#ad403e437d09e17139abe5bab8ae3f1e6">unloadObject()</a> instead of this event handler for unloading objects.</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyComponent : <span class="keyword">public</span> <a class="code" href="class_g_c_f_1_1_component.html">GCF::Component</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">void</span> <a class="code" href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">contentObjectUnloadEvent</a>(<a class="code" href="class_g_c_f_1_1_content_object_unload_event.html">GCF::ContentObjectUnloadEvent</a> *e) {</div>
<div class="line">        <span class="keywordflow">if</span>(e-&gt;name() == ....) {</div>
<div class="line">            <span class="comment">// un-initialize the object</span></div>
<div class="line">            <span class="comment">// optionally delete the object</span></div>
<div class="line">            <span class="keyword">delete</span> e-&gt;object();</div>
<div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(e-&gt;name() == ....) {</div>
<div class="line"> </div>
<div class="line">        }</div>
<div class="line"> </div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">    }</div>
<div class="line">};</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Content-object that is being unloaded will be automatically deleted by GCF, unless you reimplement the event handler to explicitly delete the object here itself.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_unloading">Component unloading (or uninitialization)</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#ae34b5127bb153d20ab27e9cc8c514325">GCF::QmlComponent</a>, and <a class="el" href="class_g_c_f_1_1_gui_component.html#af79494e17d96561cfc9c0042a975c3f0">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="a2ddd32175fb6ca0dec4ca0b7443543ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ddd32175fb6ca0dec4ca0b7443543ce">&#9670;&nbsp;</a></span>contentObjectUnmergeEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::contentObjectUnmergeEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_content_object_unmerge_event.html">GCF::ContentObjectUnmergeEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this event handler to handle content object unmerge events. This event handler is called if a content-object that is currently being unloaded by GCF needs to be unmerged from a content-object belonging to this component.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_content_object_unmerge_event.html">GCF::ContentObjectUnmergeEvent</a> object that describes the event.</td></tr>
  </table>
  </dd>
</dl>
<p>An unmerge happens when a component, whose object was merged with an object from this component, is being unloaded. This event handler can customize the process of unmerging. The default implementation calls <a class="el" href="class_g_c_f_1_1_component.html#a8c371df2820b3c36a814005a4a9910df">unmergeObject()</a> function. It is recommended that you implement <a class="el" href="class_g_c_f_1_1_component.html#a8c371df2820b3c36a814005a4a9910df">unmergeObject()</a> instead of this event handler.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_unloading">Component unloading (or uninitialization)</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#ab746732385fc42c931e6802863d19d3c">GCF::QmlComponent</a>, and <a class="el" href="class_g_c_f_1_1_gui_component.html#a3682354828ce7fbffb1377d22a6019d3">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="acdc6848ac70f5c13c78b6782a5666cd3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdc6848ac70f5c13c78b6782a5666cd3">&#9670;&nbsp;</a></span>activateContentObjectEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::activateContentObjectEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_activate_content_object_event.html">GCF::ActivateContentObjectEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this handler to handle content-object activation. The event is sent as a part of <a class="el" href="class_g_c_f_1_1_component.html#a7a6e0f95047a60edfb6e25c374a74340">activate()</a> process. The default event handler calls <a class="el" href="class_g_c_f_1_1_component.html#aa98b557a1c9a04a5f8f4586394174316">activateObject()</a>. It is recommended that you implement <a class="el" href="class_g_c_f_1_1_component.html#aa98b557a1c9a04a5f8f4586394174316">activateObject()</a> than handling this event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_activate_content_object_event.html">GCF::ActivateContentObjectEvent</a> object that describes this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_activation">Activation</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#a77275d9f06e56f415129e6f3c1a09784">GCF::QmlComponent</a>, and <a class="el" href="class_g_c_f_1_1_gui_component.html#a23ea568005310025f648155ceb84a902">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="a8fe3cdb6bb891d7e67d498a3a55900b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fe3cdb6bb891d7e67d498a3a55900b3">&#9670;&nbsp;</a></span>deactivateContentObjectEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void GCF::Component::deactivateContentObjectEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_deactivate_content_object_event.html">GCF::DeactivateContentObjectEvent</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reimplement this handler to handle content-object deactivation. The event is sent as a part of <a class="el" href="class_g_c_f_1_1_component.html#a19620ff366fc68e58ddf532acb54a598">deactivate()</a> process. The default event handler calls <a class="el" href="class_g_c_f_1_1_component.html#a4018ebb487bbe088b34e662a38c61fc8">deactivateObject()</a>. It is recommended that you implement <a class="el" href="class_g_c_f_1_1_component.html#a4018ebb487bbe088b34e662a38c61fc8">deactivateObject()</a> than handling this event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>pointer to a <a class="el" href="class_g_c_f_1_1_deactivate_content_object_event.html">GCF::DeactivateContentObjectEvent</a> object that describes this event</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_g_c_f_1_1_component.html#gcf_component_deactivation">Deactivation</a> </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_qml_component.html#a22a59c8b43d2583ae3756d0bf3169b12">GCF::QmlComponent</a>, and <a class="el" href="class_g_c_f_1_1_gui_component.html#a8b625a598a76b042b6e2948dbad4da86">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="aa764b26829ba318385b3921bf2b1800a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa764b26829ba318385b3921bf2b1800a">&#9670;&nbsp;</a></span>loadObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QObject * GCF::Component::loadObject </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is called from <a class="el" href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">GCF::Component::contentObjectLoadEvent()</a>. You can reimplement this function to return a <code>QObject</code> pointer based on the name and information map given.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>name of the object that needs to be loaded </td></tr>
    <tr><td class="paramname">info</td><td>key=value information map provided against the object that needs loading </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to a <code>QObject</code> that was loaded. </dd></dl>

</div>
</div>
<a id="ad403e437d09e17139abe5bab8ae3f1e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad403e437d09e17139abe5bab8ae3f1e6">&#9670;&nbsp;</a></span>unloadObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::unloadObject </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is called from <a class="el" href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">GCF::Component::contentObjectUnloadEvent()</a>. You can reimplement this function to unload the given object. GCF will delete the object immediately after return from this function, unless it was deleted explicitly by you in the reimplementation of this function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>name of the object that needs to be unloaded </td></tr>
    <tr><td class="paramname">object</td><td>pointer to the <code>QObject</code> that needs to be unloaded </td></tr>
    <tr><td class="paramname">info</td><td>key=value information map against the object that needs unloading </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. [Note: The return value is currently ignored] </dd></dl>

</div>
</div>
<a id="a92c9170c1333e88d516ec3eca693bfda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92c9170c1333e88d516ec3eca693bfda">&#9670;&nbsp;</a></span>mergeObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::mergeObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>child</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>parentInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>childInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is called from <a class="el" href="class_g_c_f_1_1_component.html#a1de83ead9a736b7fe19f61626b24a5b6">GCF::Component::contentObjectMergeEvent()</a>. You can reimplement this function to merge <code>child</code> into <code>parent</code>. Here <code>parent</code> belongs to this component.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>pointer to a <code>QObject</code> added by this component. </td></tr>
    <tr><td class="paramname">child</td><td>pointer to a <code>QObject</code> that needs to be merged (or parented) into <code>parent</code> </td></tr>
    <tr><td class="paramname">parentInfo</td><td>key=value information map associated with the <code>parent</code> </td></tr>
    <tr><td class="paramname">childInfo</td><td>key=value information map associated with the <code>child</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. [Note: The return value is currently ignored] </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_gui_component.html#a2df81bac62394e1ce2b3c82974d8723c">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="a8c371df2820b3c36a814005a4a9910df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c371df2820b3c36a814005a4a9910df">&#9670;&nbsp;</a></span>unmergeObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::unmergeObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>child</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>parentInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>childInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is called from <a class="el" href="class_g_c_f_1_1_component.html#a2ddd32175fb6ca0dec4ca0b7443543ce">GCF::Component::contentObjectUnmergeEvent()</a>. You can reimplement this function to unmerge <code>child</code> into <code>parent</code>. Here <code>parent</code> belongs to this component.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>pointer to a <code>QObject</code> added by this component. </td></tr>
    <tr><td class="paramname">child</td><td>pointer to a <code>QObject</code> that needs to be unmerged (or parented) into <code>parent</code> </td></tr>
    <tr><td class="paramname">parentInfo</td><td>key=value information map associated with the <code>parent</code> </td></tr>
    <tr><td class="paramname">childInfo</td><td>key=value information map associated with the <code>child</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. [Note: The return value is currently ignored] </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_gui_component.html#acf0f385b556e1742e3c5df8c9222a0f3">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="aa98b557a1c9a04a5f8f4586394174316"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa98b557a1c9a04a5f8f4586394174316">&#9670;&nbsp;</a></span>activateObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::activateObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>child</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>parentInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>childInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is called from <a class="el" href="class_g_c_f_1_1_component.html#acdc6848ac70f5c13c78b6782a5666cd3">GCF::Component::activateContentObjectEvent()</a>. You can reimplement this function to activate the <code>child</code> in a way suitable for <code>parent</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>pointer to a <code>QObject</code> added by this component. </td></tr>
    <tr><td class="paramname">child</td><td>pointer to a <code>QObject</code> that needs to be activated in <code>parent</code> </td></tr>
    <tr><td class="paramname">parentInfo</td><td>key=value information map associated with the <code>parent</code> </td></tr>
    <tr><td class="paramname">childInfo</td><td>key=value information map associated with the <code>child</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. [Note: The return value is currently ignored] </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_gui_component.html#a08afba3a4d51e310da277b9c7914643e">GCF::GuiComponent</a>.</p>

</div>
</div>
<a id="a4018ebb487bbe088b34e662a38c61fc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4018ebb487bbe088b34e662a38c61fc8">&#9670;&nbsp;</a></span>deactivateObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool GCF::Component::deactivateObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>child</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>parentInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariantMap &amp;&#160;</td>
          <td class="paramname"><em>childInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is called from <a class="el" href="class_g_c_f_1_1_component.html#a8fe3cdb6bb891d7e67d498a3a55900b3">GCF::Component::deactivateContentObjectEvent()</a>. You can reimplement this function to deactivate the <code>child</code> in a way suitable for <code>parent</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>pointer to a <code>QObject</code> added by this component. </td></tr>
    <tr><td class="paramname">child</td><td>pointer to a <code>QObject</code> that needs to be deactivated in <code>parent</code> </td></tr>
    <tr><td class="paramname">parentInfo</td><td>key=value information map associated with the <code>parent</code> </td></tr>
    <tr><td class="paramname">childInfo</td><td>key=value information map associated with the <code>child</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. [Note: The return value is currently ignored] </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_gui_component.html#aa5ee97968677c04dc230317eb87d0b4f">GCF::GuiComponent</a>.</p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a7b9e7071c2f4b483a4ee51b08b70835c"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a7b9e7071c2f4b483a4ee51b08b70835c">GCF::Component::contentLoadEvent</a></div><div class="ttdeci">virtual void contentLoadEvent(GCF::ContentLoadEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:1041</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a4c46c693324b5e524e5c1188dfb4560d"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a4c46c693324b5e524e5c1188dfb4560d">GCF::Component::settingsLoadEvent</a></div><div class="ttdeci">virtual void settingsLoadEvent(GCF::SettingsLoadEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:902</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_application_html"><div class="ttname"><a href="class_g_c_f_1_1_application.html">GCF::Application</a></div><div class="ttdoc">GCF::Application represents the non-gui, terminal application configuration available in GCF3.</div><div class="ttdef"><b>Definition:</b> Application.h:104</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_load_event_html_a033302e12daeb121564490a8f794417f"><div class="ttname"><a href="class_g_c_f_1_1_content_load_event.html#a033302e12daeb121564490a8f794417f">GCF::ContentLoadEvent::isPreContentLoad</a></div><div class="ttdeci">bool isPreContentLoad() const</div><div class="ttdef"><b>Definition:</b> Component.h:166</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html"><div class="ttname"><a href="class_g_c_f_1_1_component.html">GCF::Component</a></div><div class="ttdoc">Base class for all GCF components.</div><div class="ttdef"><b>Definition:</b> Component.h:52</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_settings_load_event_html_a2e1c4937774e651e1dc8f9fc24249956"><div class="ttname"><a href="class_g_c_f_1_1_settings_load_event.html#a2e1c4937774e651e1dc8f9fc24249956">GCF::SettingsLoadEvent::setSettingsFile</a></div><div class="ttdeci">void setSettingsFile(const QString &amp;fileName)</div><div class="ttdef"><b>Definition:</b> Component.h:150</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a0a8e6280e3029cab1db39d4a0b0cdf11"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a0a8e6280e3029cab1db39d4a0b0cdf11">GCF::Component::Component</a></div><div class="ttdeci">Component(QObject *parent=nullptr)</div><div class="ttdef"><b>Definition:</b> Component.cpp:418</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_unload_event_html"><div class="ttname"><a href="class_g_c_f_1_1_content_unload_event.html">GCF::ContentUnloadEvent</a></div><div class="ttdoc">Contains parameters that describe a content-unload event.</div><div class="ttdef"><b>Definition:</b> Component.h:222</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a75422842587613d43844e73fb8ca021d"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a75422842587613d43844e73fb8ca021d">GCF::Component::initializeEvent</a></div><div class="ttdeci">virtual void initializeEvent(GCF::InitializeEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:819</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_settings_load_event_html_aff9ed273a55bc88de7cf90f9193f1f62"><div class="ttname"><a href="class_g_c_f_1_1_settings_load_event.html#aff9ed273a55bc88de7cf90f9193f1f62">GCF::SettingsLoadEvent::isPreSettingsLoad</a></div><div class="ttdeci">bool isPreSettingsLoad() const</div><div class="ttdef"><b>Definition:</b> Component.h:147</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a47f8742e87fa5ad86ed822cb60d90a79"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a47f8742e87fa5ad86ed822cb60d90a79">GCF::Component::contentUnloadEvent</a></div><div class="ttdeci">virtual void contentUnloadEvent(GCF::ContentUnloadEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:1409</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_object_load_event_html"><div class="ttname"><a href="class_g_c_f_1_1_content_object_load_event.html">GCF::ContentObjectLoadEvent</a></div><div class="ttdoc">Contains parameters that describe a content-object-load event.</div><div class="ttdef"><b>Definition:</b> Component.h:252</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a8105c199273cebd258ffda96e191c3d9"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a8105c199273cebd258ffda96e191c3d9">GCF::Component::settings</a></div><div class="ttdeci">const QSettings * settings() const</div><div class="ttdef"><b>Definition:</b> Component.cpp:486</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a06e3573f06292a5211b81201ced61deb"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a06e3573f06292a5211b81201ced61deb">GCF::Component::load</a></div><div class="ttdeci">void load()</div><div class="ttdef"><b>Definition:</b> Component.cpp:522</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_settings_load_event_html"><div class="ttname"><a href="class_g_c_f_1_1_settings_load_event.html">GCF::SettingsLoadEvent</a></div><div class="ttdoc">Contains parameters that describe an settings load event.</div><div class="ttdef"><b>Definition:</b> Component.h:139</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_object_load_event_html_ac1016669478dc3d263622aa5cefa70bf"><div class="ttname"><a href="class_g_c_f_1_1_content_object_load_event.html#ac1016669478dc3d263622aa5cefa70bf">GCF::ContentObjectLoadEvent::setObject</a></div><div class="ttdeci">void setObject(QObject *object)</div><div class="ttdef"><b>Definition:</b> Component.h:263</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a424f54d7c57c719b0ec16c3094ca565a"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a424f54d7c57c719b0ec16c3094ca565a">GCF::Component::name</a></div><div class="ttdeci">virtual QString name() const</div><div class="ttdef"><b>Definition:</b> Component.cpp:444</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_load_event_html"><div class="ttname"><a href="class_g_c_f_1_1_content_load_event.html">GCF::ContentLoadEvent</a></div><div class="ttdoc">Contains parameters that describe a content-load event.</div><div class="ttdef"><b>Definition:</b> Component.h:158</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a8447de04766d75220159e9db2ceeb5c8"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a8447de04766d75220159e9db2ceeb5c8">GCF::Component::contentObjectLoadEvent</a></div><div class="ttdeci">virtual void contentObjectLoadEvent(GCF::ContentObjectLoadEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:1125</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a8c7530baab5694de7676a76eeb50eb3f"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a8c7530baab5694de7676a76eeb50eb3f">GCF::Component::unload</a></div><div class="ttdeci">void unload()</div><div class="ttdef"><b>Definition:</b> Component.cpp:532</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_object_load_event_html_a01c95daa931ecc802bf0ec42c7d03206"><div class="ttname"><a href="class_g_c_f_1_1_content_object_load_event.html#a01c95daa931ecc802bf0ec42c7d03206">GCF::ContentObjectLoadEvent::objectName</a></div><div class="ttdeci">QString objectName() const</div><div class="ttdef"><b>Definition:</b> Component.h:260</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_initialize_event_html_a4b61e463cf081b95e8e227d6a28f60ef"><div class="ttname"><a href="class_g_c_f_1_1_initialize_event.html#a4b61e463cf081b95e8e227d6a28f60ef">GCF::InitializeEvent::isPreInitialize</a></div><div class="ttdeci">bool isPreInitialize() const</div><div class="ttdef"><b>Definition:</b> Component.h:132</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_settings_unload_event_html"><div class="ttname"><a href="class_g_c_f_1_1_settings_unload_event.html">GCF::SettingsUnloadEvent</a></div><div class="ttdoc">Contains parameters that describe a settings-unload event.</div><div class="ttdef"><b>Definition:</b> Component.h:207</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_load_event_html_a9a6a2ddca167a46d10d76111f64777e1"><div class="ttname"><a href="class_g_c_f_1_1_content_load_event.html#a9a6a2ddca167a46d10d76111f64777e1">GCF::ContentLoadEvent::setContentFile</a></div><div class="ttdeci">void setContentFile(const QString &amp;fileName)</div><div class="ttdef"><b>Definition:</b> Component.h:169</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_initialize_event_html"><div class="ttname"><a href="class_g_c_f_1_1_initialize_event.html">GCF::InitializeEvent</a></div><div class="ttdoc">Contains parameters that describe an initialization event.</div><div class="ttdef"><b>Definition:</b> Component.h:124</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_content_object_unload_event_html"><div class="ttname"><a href="class_g_c_f_1_1_content_object_unload_event.html">GCF::ContentObjectUnloadEvent</a></div><div class="ttdoc">Contains parameters that describe a content-object-unload event.</div><div class="ttdef"><b>Definition:</b> Component.h:338</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_settings_unload_event_html_a5bea1fb732ecdb5227a9a404de5515c5"><div class="ttname"><a href="class_g_c_f_1_1_settings_unload_event.html#a5bea1fb732ecdb5227a9a404de5515c5">GCF::SettingsUnloadEvent::isPreSettingsUnload</a></div><div class="ttdeci">bool isPreSettingsUnload() const</div><div class="ttdef"><b>Definition:</b> Component.h:215</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a692d57781b5f4e9034624e31b6727c14"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a692d57781b5f4e9034624e31b6727c14">GCF::Component::contentObjectUnloadEvent</a></div><div class="ttdeci">virtual void contentObjectUnloadEvent(GCF::ContentObjectUnloadEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:1289</div></div>
<div class="ttc" id="aclass_g_c_f_1_1_component_html_a03b90d525333d9a4e5f34fd16ad8bf35"><div class="ttname"><a href="class_g_c_f_1_1_component.html#a03b90d525333d9a4e5f34fd16ad8bf35">GCF::Component::settingsUnloadEvent</a></div><div class="ttdeci">virtual void settingsUnloadEvent(GCF::SettingsUnloadEvent *e)</div><div class="ttdef"><b>Definition:</b> Component.cpp:959</div></div>
</div>
</div>
</div>
<div class="footer_content">
<table width="100%" class="footer">
<tr>
<td align="left" width="50%">Copyright &copy; 2013-2019,
 <a class="el" href="http://www.vcreatelogic.com" target="_black">VCreate Logic Private Limited</a></td>
<td align="right" width="50%"><a class="el" href="http://www.vcreatelogic.com/products/gcf" target="_black">GCF - Generic Component Framework</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
